function R = C_Setup_VarGapRat1
  
global CG;

% Platforms are defined from their back to their front (e.g. w.r.t. Sensorlocations)
CG.Parameters.Setup.ControlID = 1;
CG.Parameters.Setup.CameraID = 2;

CG.Parameters.Setup.Platforms = struct(...  
  'Location',{'left','right'},...
  'AnimalSensors',{[repmat(CG.Parameters.Setup.ControlID,1,3);1,2,3],[repmat(CG.Parameters.Setup.ControlID,1,3);5,6,7]},...
  'PositionSensors',{[CG.Parameters.Setup.ControlID;4],[CG.Parameters.Setup.ControlID;8]},...
  'Position',{0,0},...
  'RangeMax',{50,50},...
  'PositionOffset',{9,9},... 
  'MotorMM2Step',{40,40},... 
  'GateCloseAngle',{40,180},... 
  'GateOpenAngle',{120,80},... 
  'GateState',{'open','open'},...
  'MotorID',{1,2},...
  'TimePerMM',{0.3,0.3},...
  'WaitTime',{0.1,0.1},...
  'StepTime',{0.1,0.1},...
  'AnalogThresholds',{[0.35,0.4,0.25,0.6],[0.4,0.35,0.7,0.5]}); 
      
CG.Parameters.Setup.Camera = struct(...
  'Location','top',...
  'FrameRate',300,...
  'PositionSensors',[CG.Parameters.Setup.CameraID;1],...
  'Position',0,'RangeMax',115,...
  'DistanceToCenter',50.7,... 
  'DistanceToPlatform',50,...
  'CameraID',1,...
  'MotorMM2Step',7.87,... 
  'MotorID',1,...
  'TimePerMM',0.1,... 
  'TriggerPeriod',0...
  'WaitTime',0.1,...
  'StepTime',0.1,...
  'AnalogThresholds',0.4*ones(1,8)); % in us